package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.demo.entity.Post;
import com.example.demo.entity.responseJson.QueryPostRes;
import com.example.demo.mapper.base.PostBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 帖子基本信息表(Post)表数据库访问层
 *
 * @author 杨丽辉
 * @since 2021-03-12 17:26:58
 */
@Component
@Mapper
public interface PostMapper extends PostBaseMapper {
    List<QueryPostRes> queryPost(@Param(Constants.WRAPPER) Wrapper<Post> ew);
    int countfavCount(@Param(Constants.WRAPPER) Wrapper<Post> ew);
    int countlikeCount(@Param(Constants.WRAPPER) Wrapper<Post> ew);
    int countcommentCount(@Param(Constants.WRAPPER) Wrapper<Post> ew);

}
